<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>工作管理系统</title>
<link href="/static/css/application.css" media="all" rel="stylesheet" type="text/css" />

<script src="/static/js/prototype.js" type="text/javascript"></script>
<script src="/static/js/effects.js" type="text/javascript"></script>
<script src="/static/js/dragdrop.js" type="text/javascript"></script>
<script src="/static/js/controls.js" type="text/javascript"></script>
<script src="/static/js/application.js" type="text/javascript"></script>

<link href="/static/js/jstoolbar.css" media="screen" rel="stylesheet" type="text/css" />
<!--[if IE]>
    <style type="text/css">
      * html body{ width: expression( document.documentElement.clientWidth < 900 ? '900px' : '100%' ); }
      body {behavior: url(/stylesheets/csshover.htc?1297528743);}
    </style>
<![endif]-->

<!-- page specific tags -->
</head>
<body class="controller-projects action-show">
  <div id="content-iframe">
    <div class="contextual">
      <a href="/admin/dept/create?parent={{dept.id}}" target="_parent" class="icon icon-add">新建部门</a>&nbsp;&nbsp;<a href="/admin/user/register/{{dept.id}}" class="icon icon-add">新建职员</a>
    </div>
    <h2>{% if dept %}{{dept.name}}{%endif%}用户列表</h2>
    <div class="autoscroll">
      <table class="list issues">
        <thead>
          <tr>
            <th>用户名</th>
            <th>真实姓名</th>
            {% if not dept %}<th>部门</th>{%endif%}
            <th>上级主管</th>
            <th>操作</th>
          </tr>
        </thead>
        <tbody>
          {%for detail in list%}
          <tr>
            <td>{{detail.user.username}}</td>
            <td>{{detail.user.last_name}}</td>
            {% if not dept %}<td><a href="/admin/user/list/{{detail.dept.id}}">{{detail.dept.name}}</a></td>{%endif%}
            <td>{% if detail.superior_auth_user %}{{detail.superior_auth_user.username}}{%else%}无{%endif%}</td>
            <td><a href="/admin/dept/edit/{{dept.id}}">编辑</a>&nbsp;&nbsp;<a href="/admin/dept/delete/{{dept.id}}">删除</a></td>
          </tr>
          {%endfor%}
        </tbody>
      </table>
    </div>
  </div>
</body>
</html>